package com.llyb.tingshu.album.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.llyb.tingshu.model.album.TrackInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.llyb.tingshu.query.album.TrackInfoQuery;
import com.llyb.tingshu.vo.album.AlbumTrackListVo;
import com.llyb.tingshu.vo.album.TrackInfoVo;
import com.llyb.tingshu.vo.album.TrackListVo;
import com.llyb.tingshu.vo.album.TrackStatMqVo;

import java.util.List;
import java.util.Map;

public interface TrackInfoService extends IService<TrackInfo> {

    void saveTrackInfo(TrackInfoVo trackInfoVo,Long userId);

    IPage<TrackListVo> findUserTrackPage(Page<TrackListVo> page, TrackInfoQuery trackInfoQuery);

    boolean removeTrackInfo(Long trackId);


    boolean updateTrackInfo(TrackInfo trackInfo);

    IPage<AlbumTrackListVo> findAlbumTrackPage(IPage<AlbumTrackListVo> iPage, Long albumId, Long userId);

    void updateStat(TrackStatMqVo trackStatMqVo);

    /**
     * 查询用户需要购买的声音
     * @param trackId
     * @param userId
     * @return
     */
    List<Map<String, Object>> findUserTrackPaidList(Long trackId, Long userId);

    /**
     * 批量获取下单付费声音列表
     * @param trackId
     * @param trackCount
     * @return List<TrackInfo>
     */
    List<TrackInfo> findPaidTrackInfoList(Long trackId, Integer trackCount);
}
